package com.esl.model.admin;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "T_Report")
@Cache(usage=CacheConcurrencyStrategy.READ_ONLY)
public class Report implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7869607663041044370L;
	private Integer id;
	private User user;
	private String content;
	private String solution;
	private String question;
	private String nextplan;
	private String temp;

	private Date date = new Date();

	public Report() {
		super();
	}

	public Report(User user, String content, String solution, String question,
			String nextplan) {
		super();
		this.user = user;
		this.content = content;
		this.solution = solution;
		this.question = question;
		this.nextplan = nextplan;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "r_id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "u_uid")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "r_content")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "r_solution")
	public String getSolution() {
		return solution;
	}

	public void setSolution(String solution) {
		this.solution = solution;
	}

	@Column(name = "r_qurstion")
	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	@Column(name = "r_nextplan")
	public String getNextplan() {
		return nextplan;
	}

	public void setNextplan(String nextplan) {
		this.nextplan = nextplan;
	}

	@Column(name = "r_date")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "r_temp")
	public String getTemp() {
		return temp;
	}

	public void setTemp(String temp) {
		this.temp = temp;
	}

}
